home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-01 / lcppb.zip / LCPPANS.ZIP / RAIN2.CPP < prev    next >
C/C++ Source or Header  |  1991-07-08  |  504b  |  23 lines

  1. // rain2.cpp -- Use string to read a floating point value
  2.  
  3. #include <iostream.h>
  4. #include <stdlib.h>
  5.  
  6. main()
  7. {
  8.   float rainFall;
  9.   char response[128];
  10.  
  11.   cout << "Enter rain fall in inches: ";
  12.   cin >> response;
  13.   rainFall = atof(response);
  14.   cout << "You entered : " << rainFall;
  15. }
  16.  
  17.  
  18. // Copyright (c) 1990 by Tom Swan. All rights reserved
  19. // Revision 1.00    Date: 10/23/1990   Time: 03:56 pm
  20.  
  21. // Revision 1.01    Date: 07/08/1991   Time: 05:41 pm
  22. // Converted for Borland C++ 2.0
  23.